<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="/css/style.css?version=<?php echo $version?>" rel="stylesheet" />
<title>综合管理平台</title>
<script language="javascript" src="/js/jquery-1.11.1.min.js"></script>
<script language="javascript" src="/js/manager.js?version=<?php echo $version?>"></script>
<script language="javascript" src="/js/base.js?version=<?php echo $version?>"></script>
</head>
<body>
<div class="mG_main">
	<!-- main -->
    <div class="mG_module">
          <div class="findlist">
            <div style="width: 100%; text-align: right; padding-bottom: 5px;">
            	<input type="button" value=" 返 回 " id="back_button" /> &nbsp;
            	<input type="button" value=" 添 加 " id="add_button" multi_id="<?php echo $multi_id?>" />
            </div>
          </div>
    
        <div class="user_list">
        <table cellspacing="0" cellpadding="0" class="common_table">
                <colgroup>
                    <col width="5%">
                    <col width="*">
                    <col width="15%">
                    <col width="10%">
                </colgroup>
                <thead>
                    <tr>
                        <th>id</th>
                        <th>标题</th>
                        <th>添加时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                	<?php foreach ($material_list as $item){?>
					<tr>
						<td><?php echo $item['id']?></td>
						<td style="word-wrap:break-word"><?php echo $item['title']?></td>
						<td><?php echo $item['add_time']?></td>
						<td>
							<a href="/material/edit?id=<?php echo $item['id']?>">修改</a><span class="split"></span>
							<a href="javascript:void(0);" class="rmid" rmid="<?php echo $item['id']?>">移除</a>
						</td>
                    </tr>
                    <?php }?>
                </tbody>
            </table>
        <div class="page_selector">
			<a href="#">第一页</a> | 
			<a href="#">上一页</a> | 
			<a href="#">下一页</a>
        </div>
    </div>
        </div>
        <!-- /main-->
        <div class="clearit"></div>
	  </div>
	  
<script type="text/javascript">
$(document).ready(function(){
	$("#back_button").click(function(){
		window.location.href = '/material?type=2';
	});
	$("#add_button").click(function(){
		window.location.href = '/material/edit?type=2&multi_id=' + $(this).attr("multi_id");
	});
	$(".rmid").click(function(){
		if(confirm("确认删除？")){
			window.location.href = '/material/del?id=' + $(this).attr("rmid");
		}
	});
});
</script>

</body>
</html>
